import java.util.Scanner;

/**
 * @author gao
 * @date 2025/8/8 14:57
 */

public class Main {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        while (in.hasNext()) {
            long k = in.nextLong();
            System.out.println(Fibonacci(k));
        }
    }

    public static long Fibonacci(long n) {
        long mod = (long)1e9 + 7;
        if (n == 1 || n == 2) {
            return 1;
        }

        long[] dp = new long[(int)(n + 1)];

        dp[1] = dp[2] = 1;

        for (int i = 3; i <= n; i++) {
            dp[i] = (dp[i - 1] + dp[i - 2]) % mod;
        }

        return dp[(int)(n)];
    }
}